package com.mxpio.erp.common.plan.service;

import com.mxpio.erp.common.plan.entity.ManufacturePlan;
import com.mxpioframework.common.vo.Result;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.system.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.List;

public interface ManufacturePlanService extends BaseService<ManufacturePlan> {

    @Transactional(readOnly = true)
    Page<ManufacturePlan> listPage(Pageable page, Criteria c);

    @Transactional
    Result<Object> changeToOutsourceFlag(List<ManufacturePlan> planList);

    Result<ManufacturePlan> split(String planNo, BigDecimal splitNum);
}
